package com.kevin.observer;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * 抽象目标
 *
 * @author kevin
 * @date 2025/8/13
 */
public abstract class Subject {

    protected List<Observer> list = new ArrayList<>();

    public void add(Observer observer) {
        list.add(observer);
    }

    public void remove(Observer observer) {
        list.remove(observer);
    }

    public abstract void notifyObserver();
}
